<!doctype html>
<html>
  <head>
    <style type="text/css">
html, body {
  width: 100%;
  height: 100%;
  min-height: 100%;
}
    </style>
  </head>
  <body>
    <div>
      <div id="text"></div>
    </div>
    <script src="https://unpkg.com/rxjs@5.5.2/bundles/Rx.min.js"></script>
    <script>
const event$ = Rx.Observable.fromEvent(document.body, 'click');
const x$ = event$.map(e => e.x);
const y$ = event$.map(e => e.y);
const result$ = x$.withLatestFrom(y$, (x, y) => `x: ${x}, y: ${y}`);
result$.subscribe(
    (location) => {
      console.log('#render', location);
      document.querySelector('#text').innerText = location;
    }
);
    </script>
  </body>
</html>

